Graphics packages are currently available for rendering images such as printed pages to printers, display screens, or for output to software files to be stored in storage devices. Some of these graphics packages utilise a high-level page description language for effecting the layout of the printed pages. These graphics packages typically comprise a rendering system, which converts the high-level page description of the page layout into pixel data that can be used as raster data to be printed or displayed.
Computer-generated images are typically made up of many different components or graphical elements which are rendered and composited together to create a final image. The rendering and compositing may be performed by special-purpose hardware, or by software running on a general or special-purpose computer system, such as a microprocessor inside a printer. For each graphical element, a software application sends a drawing command to a graphics device interface layer. The printer driver generates a final description of the page to be printed which comprises a description of each graphical element. Examples of graphical elements include text strings, paths and images. This final description is called a display list. The display list is then spooled (ie transferred) to a print engine in the target printer. The display list consists of a set of rendering instructions. The terms “Display list” and “set of rendering instructions” are used interchangeably throughout this description, unless otherwise indicated.
The display list is typically stored in memory while it is processed by the computer system. Some rendering instructions, particularly instructions containing an image, have high memory requirements. To reduce the amount of memory needed in the system, and hence reduce the cost of hardware in the system, it is desirable to reduce the size of these instructions by applying compression to the image data contained therein. Various image compression methods are available, including lossless and lossy methods. The best compression method to use in any particular case depends on the image content. Image content can typically be categorized broadly into two categories, namely “graphics” and “natural images”.
Graphics are typically computer-generated images with sharp edges and a limited number of colours. Examples of images in the graphics category are informational graphs, text, diagrams, and line-art. Graphics usually contain blocks of solid colour.
Natural images are images that are typically sourced from the “real world”. These include images captured using a digital camera or scanner. Natural images typically contain a larger number of colours and more gradual colour variations than graphics.
Both graphics and natural images contain redundant information when described in a raw pixel-based format, which makes each type of image suitable for compression to some extent. However, not all compression methods are suitable for each type of image. Selecting an unsuitable compression method for an image can lead to an unacceptable amount of image quality degradation and a poor compression ratio (in some cases leading to a compressed size larger than the original image size). It is therefore desirable to select a suitable compression method.
Some methods for selecting a suitable compression method divide an image into strips or blocks and analyse the image data in each strip or block independently. This analysis can then be used to select a suitable compression method to use for individual strips or blocks, or a compression method to use for the entire image. These solutions typically make a trade-off between the effectiveness of the final decision and the proportion of image data that is analysed. This means choosing between achieving an optimal compressed size for the image and an acceptably brief execution time for analysis.